home *** CD-ROM | disk | FTP | other *** search
- Path: engnews1.Eng.Sun.COM!taumet!clamage
- From: David Byrden <100101.2547@compuserve.com>
- Newsgroups: comp.std.c++
- Subject: Tiny but embarassing typo in standard
- Date: 23 Feb 1996 03:39:36 GMT
- Organization: self-employed
- Approved: clamage@eng.sun.com (comp.std.c++)
- Message-ID: <4girfp$soo@news.bridge.net>
- NNTP-Posting-Host: taumet.eng.sun.com
- Mime-Version: 1.0
- Content-Type: text/plain; charset="us-ascii"
- Content-Transfer-Encoding: 7bit
- X-Nntp-Posting-Host: ppp-mia2-81.bridge.net
- X-Mailer: Mozilla 1.1N (Windows; I; 16bit)
- X-Lines: 26
- Content-Length: 592
- Originator: clamage@taumet
-
-
-
- 14.3.2.1
-
- template<class T> class Y {
- public:
- void f1() { g1(1); }
- void f2() { g2(2); }
- void f3() { g3(3); }
- void f4() { g4(4); }
- };
-
- void k(const Y<int>& h)
- {
- void g1(int);
- h.f1(); // error: g1(int) called by g1(1) not found
- // local g1() not considered
- }
-
-
- Of course, f1() cannot be called in any case because someone forgot to
- declare it const.
-
- David
-
-
-
- [ To submit articles: Try just posting with your newsreader.
- If that fails, use mailto:std-c++@ncar.ucar.edu
- FAQ: http://reality.sgi.com/employees/austern_mti/std-c++/faq.html
- Policy: http://reality.sgi.com/employees/austern_mti/std-c++/policy.html
- Comments? mailto:std-c++-request@ncar.ucar.edu
- ]
-